Suppose rejects for large values of . We can informally define p-value as the "under null hypothesis, probability that is as large or larger than what we observed". I.e.
Example
Binomial: . . One-sided test rejects for large :
Normal: . . Two-sided test rejects for large (i.e. ). The two-sided p-value is where
Now we give a formal definition:
P-Value
Given . Assume we have a test for each significance level . (For non-randomized case, it's )
Assume tests are monotone in : if , then . (For non-randomized case, it's )
Then p-value is
here measures how "extreme" an observed is.
For ,
So p-value stochastically dominates .
If rejects for large , reduces to original definition.
Note the p-value is defined based on
The model and hypothesis ;
The data
The choice of test.
Example
Exponential: . . We can use equal-tailed test or UMPU test. For ,
Equal-tailed test:
UMPU: for which .
Normal: . . We can use test or maximum test .
2 Confidence Sets
2.1 Definition
Confidence Set
is a confidence set for if .
We say covers if . is coverage probability. is confidence level.
is random, not . is a deterministic function of .
Often misinterpreted as Bayesian guarantee.
say " has a chance of covering", not ""
2.2 Duality of Testing & Confidence Sets
Suppose we have a level- test of
We can use it to make a confidence set for :
Let (all non-rejected values of ). Then
Alternatively, suppose is a confidence set for . We can use to construct a test of (2.1): let . For , This is called inverting the test.
2.3 Confidence Interval for Median
For nonparametric model , ( is any c.d.f) Define . Consider two-sided test
Denote . Reject for . Then
3 Confidence Intervals/Bounds
If , we say is a confidence interval (CI).
is lower confidence bound (LCB).
is upper confidence bound (UCB).
We usually get LCB/UCB by inverting a one-sided test in appropriate direction called uniformly most accurate (UMA) if test UMP. And get CI by inverting a two-sided test called UMAU if test is UMPU.
Example
. C.d.f .
LCB: Invert test for . Solve for and we get . So , so .
UCB: Similarly, .
Equal tailed CI: invert equal tailed test of : and